int isPalindrome(char* str)
{
    int len = strlen(str);
    if (len <= 1)    return 1;
    char* end = str + len - 1;
    char* begin = str;
    while (begin < end)
    {
        if (*begin != *end)
            return 0;
        begin++;
        end--;
    }
    return 1;
}